package org.yate.oa.dao.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.yate.oa.dao.IBaseMapperDao;
import org.yate.oa.model.HistoryEntity;
import org.yate.oa.utils.Pagination;

@Repository(value = "historyMapper")
@CacheNamespace(size = 512)
public interface HistoryMapper extends IBaseMapperDao<HistoryEntity, Integer> {

	List<HistoryEntity> getEntities();

	List<HistoryEntity> getEntitiesBy(final HistoryEntity e);

	List<HistoryEntity> getEntitiesByCreaterId(Pagination<HistoryEntity> page, @Param(value = "orderField") final String orderField, @Param(value = "orderMode") final String orderMode,
			@Param(value = "where") String... strs);

	List<HistoryEntity> getEntitiesByCreaterId2(Pagination<HistoryEntity> page, @Param(value = "orderField") final String orderField, @Param(value = "orderMode") final String orderMode,
			@Param(value = "where") String... strs);

	List<HistoryEntity> getEntitiesByApproverId(Pagination<HistoryEntity> page, @Param(value = "orderField") final String orderField, @Param(value = "orderMode") final String orderMode,
			@Param(value = "where") String... strs);

	List<HistoryEntity> getEntitieSearch(Pagination<HistoryEntity> page, @Param(value = "orderField") final String orderField, @Param(value = "orderMode") final String orderMode,
			@Param(value = "where") final Map<String, Object> map);

	List<HistoryEntity> getEntitieSearch(@Param(value = "where") Map<String, Object> map);
}
